From adc4ca65bccfa6265bdd5e1ae70aabae09bd617b Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 25 Oct 2022 12:50:37 +0200 Subject: [PATCH] luci-base: dispatcher.uc: reintroduce support for 'absent' fs depends The ability to require certain paths to be absent for a menu entry to show up was lost during the ucode conversion. Signed-off-by: Jo-Philipp Wich --- modules/luci-base/ucode/dispatcher.uc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/luci-base/ucode/dispatcher.uc b/modules/luci-base/ucode/dispatcher.uc index 7ff8d49c12..50c1a7d0f2 100644 --- a/modules/luci-base/ucode/dispatcher.uc +++ b/modules/luci-base/ucode/dispatcher.uc @@ -183,6 +183,10 @@ function check_fs_depends(spec) { if (fstat?.type != 'file') return false; } + else if (kind == 'absent') { + if (stat(path) != null) + return false; + } } return true; -- 2.30.2